﻿using System;
using System.Diagnostics;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TeamDeploy.Tasks.Tests
{
    /// <summary>
    /// Summary description for KillProcessTests
    /// </summary>
    [TestClass]
    public class KillProcessTests
    {
        [TestMethod]
        public void KillProcessExecute()
        {

            Process.Start("notepad.exe");
            
            KillProcess task = new KillProcess();

            task.BuildEngine = new MockBuild();
            task.ProcessName = "notepad.exe";
            task.KillAppPathFilename = "c:\\pstools\\pskill2.exe";
            task.TargetMachine = Environment.MachineName;

            Assert.IsTrue(task.Execute(), "Execute Failed");

        }
    }
}
